package icom.acm.admin.been;
/**
 * 后台管理功能节点类，用来创建每个功能提供该功能的页面连接
 * @author shench
 * @since 2012-4-27
 */
public class AFunction {
	private Integer F_ID;		// 编号
	private Integer F_PID;		// 父节点编号
	private String F_NAME;		// 名称
	private String F_URL;		// 连接网页
	private String F_FRAME;		// 连接页面所显示的框架
	private Integer F_ORDERID;	// 顺序号
	private Integer F_LEVEL;	// 节点等级
	public Integer getF_ID() {
		return F_ID;
	}
	public void setF_ID(final Integer f_id) {
		F_ID = f_id;
	}
	public String getF_NAME() {
		return F_NAME;
	}
	public void setF_NAME(final String f_name) {
		F_NAME = f_name;
	}
	public Integer getF_ORDERID() {
		return F_ORDERID;
	}
	public void setF_ORDERID(final Integer f_orderid) {
		F_ORDERID = f_orderid;
	}
	public Integer getF_PID() {
		return F_PID;
	}
	public void setF_PID(final Integer f_pid) {
		F_PID = f_pid;
	}
	public String getF_URL() {
		return F_URL;
	}
	public void setF_URL(final String f_url) {
		F_URL = f_url;
	}
	public String getF_FRAME() {
		return F_FRAME;
	}
	public void setF_FRAME(final String f_frame) {
		F_FRAME = f_frame;
	}
	public Integer getF_LEVEL() {
		return F_LEVEL;
	}
	public void setF_LEVEL(final Integer f_level) {
		F_LEVEL = f_level;
	}
	/**
	 * 得到树状javascript代码
	 * @return
	 */
	public String getTreeCode(){
//		 nodeId | parentNodeId | nodeName | nodeUrl |
		final String s = F_ID + "|" + 
			F_PID+ "|" + F_NAME + "|" + F_URL + "|" + F_FRAME; 
		return s;
	}
	/**
	 * 得到对象传递连接
	 * @return
	 */
	public String getUrl(){
		String url = "admin/manager/functionmgr.jsp?";
		url = url + "f_id=" + getF_ID() + "&";
		url = url + "f_pid=" + getF_PID() + "&";
		url = url + "f_name=" + getF_NAME() + "&";
		url = url + "f_frame=" + getF_FRAME() + "&";
		url = url + "f_url=" + getF_URL();
System.out.println(url);		
		return url;
	}
}
